package com.dragon.lib_mvi.base

import com.dragon.lib_mvi.IView

/***
 * @ClassName BaseMVIActivity
 * @Author Administrator
 * @description
 * @date 2025/2/24
 */
abstract class BaseMVIActivity : BaseActivity(), IView {
    /*
    *创建ViewModel
    * */
    abstract fun generateViewModel()

    override fun initEnv() {
        super.initEnv()
        generateViewModel()
    }

    /*
    * 页面活跃的时候采取处理状态更新ui
    * */
    override fun onResume() {
        super.onResume()
        handleState()
    }
}